<section class="comment">
    <p class="local-info">
        Comment is disabled to avoid unwanted discussions from 'localhost:1313' on your Disqus
        account...
    </p>
    <div id="disqus_thread"></div>
</section>
<script type="text/javascript">

    (function () {
        if (window.location.hostname == "localhost") {
            return
        }
        document.querySelector('.local-info').classList.add('hide')

        let dsq = document.createElement('script')
        dsq.type = 'text/javascript'
        dsq.async = true
        let disqus_shortname = '{{ .Site.DisqusShortname }}'
        dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq)
    })()
</script>
